package com.pur.zsms.auto;

import java.sql.Timestamp;

import javax.annotation.Resource;

import com.pur.zsms.common.exception.GenericException;
import com.pur.zsms.ordercustommanage.dao.ISelectFoodDao;

public class Job {
	private Timestamp preTime = null;
	@Resource(name = "selectFoodDao")
	private ISelectFoodDao selectFoodDaoImpl;

	public ISelectFoodDao getSelectFoodDaoImpl() {
		return selectFoodDaoImpl;
	}

	public void setSelectFoodDaoImpl(ISelectFoodDao selectFoodDaoImpl) {
		this.selectFoodDaoImpl = selectFoodDaoImpl;
	}

	public void send() {
		// System.out.println("send start...." + preTime);
		try {
			int a = selectFoodDaoImpl.auto();
			// System.out.println(a);
			preTime = new Timestamp(System.currentTimeMillis());
		} catch (GenericException e) {
			e.printStackTrace();
		}
		// System.out.println("send end......" + preTime);
	}
}